package com.example.demovote.service;

import lombok.Data;

@Data
public class ServiceException extends Exception{

    private int code; // 错误码

    public ServiceException(int code, String msg, Throwable cause){
        super(msg,cause);
        this.code = code;
    }

    public ServiceException(int code, String msg){
        super(msg);
        this.code = code;
    }

}
